package com.atstudy.headline.web.app.service.impl;

import com.atstudy.headline.entity.BaseDicts;
import com.atstudy.headline.web.app.mapper.BaseDictsMapper;
import com.atstudy.headline.web.app.service.BaseDictsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
* @author A
* @description 针对表【base_dicts(基础字典表，维护所有类型映射关系)】的数据库操作Service实现
* @createDate 2025-06-12 13:55:56
*/
@Service
public class BaseDictsServiceImpl extends ServiceImpl<BaseDictsMapper, BaseDicts>
    implements BaseDictsService {

    public List<String> getDictTypes() {

        /**
         * 查询字典类型
         */
        List<BaseDicts> dictList = list();
        return dictList.stream()
                .map(BaseDicts::getDictType)
                .distinct()
                .collect(Collectors.toList());
    }

}




